diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php
index 42355df..e722a07 100644
--- a/system/helpers/form_helper.php
+++ b/system/helpers/form_helper.php
@@ -37,7 +37,7 @@
  * @param	array	a key/value pair of attributes
  * @param	array	a key/value pair hidden data
  * @return	string
- */	
+ */
 if ( ! function_exists('form_open'))
 {
 	function form_open($action = '', $attributes = '', $hidden = array())
@@ -52,9 +52,9 @@
 		$action = ( strpos($action, '://') === FALSE) ? $CI->config->site_url($action) : $action;
 
 		$form = '<form action="'.$action.'"';
-	
+
 		$form .= _attributes_to_string($attributes, TRUE);
-	
+
 		$form .= '>';
 
 		// CSRF
@@ -143,7 +143,7 @@
 		{
 			foreach ($value as $k => $v)
 			{
-				$k = (is_int($k)) ? '' : $k; 
+				$k = (is_int($k)) ? '' : $k;
 				form_hidden($name.'['.$k.']', $v, TRUE);
 			}
 		}
@@ -250,10 +250,10 @@
 		}
 		else
 		{
-			$val = $data['value']; 
+			$val = $data['value'];
 			unset($data['value']); // textareas don't use the value attribute
 		}
-		
+
 		$name = (is_array($data)) ? $data['name'] : $data;
 		return "<textarea "._parse_form_attributes($data, $defaults).$extra.">".form_prep($val, $name)."</textarea>";
 	}
@@ -279,7 +279,7 @@
 		{
 			$extra .= ' multiple="multiple"';
 		}
-		
+
 		return form_dropdown($name, $options, $selected, $extra);
 	}
 }
@@ -414,7 +414,7 @@
 	function form_radio($data = '', $value = '', $checked = FALSE, $extra = '')
 	{
 		if ( ! is_array($data))
-		{	
+		{
 			$data = array('name' => $data);
 		}
 
@@ -435,7 +435,7 @@
  * @return	string
  */
 if ( ! function_exists('form_submit'))
-{	
+{
 	function form_submit($data = '', $value = '', $extra = '')
 	{
 		$defaults = array('type' => 'submit', 'name' => (( ! is_array($data)) ? $data : ''), 'value' => $value);
@@ -512,7 +512,7 @@
 
 		if ($id != '')
 		{
-			 $label .= " for=\"$id\"";
+			$label .= " for=\"$id\"";
 		}
 
 		if (is_array($attributes) AND count($attributes) > 0)
@@ -610,7 +610,7 @@
 	function form_prep($str = '', $field_name = '')
 	{
 		static $prepped_fields = array();
-		
+
 		// if the field name is an array we do this recursively
 		if (is_array($str))
 		{
@@ -635,7 +635,7 @@
 		{
 			return $str;
 		}
-		
+
 		$str = htmlspecialchars($str);
 
 		// In case htmlspecialchars misses these.
@@ -645,7 +645,7 @@
 		{
 			$prepped_fields[$field_name] = $field_name;
 		}
-		
+
 		return $str;
 	}
 }
@@ -757,7 +757,7 @@
 		$OBJ =& _get_validation_object();
 
 		if ($OBJ === FALSE)
-		{ 
+		{
 			if ( ! isset($_POST[$field]))
 			{
 				if (count($_POST) === 0 AND $default == TRUE)
@@ -768,7 +768,7 @@
 			}
 
 			$field = $_POST[$field];
-			
+
 			if (is_array($field))
 			{
 				if ( ! in_array($value, $field))
@@ -823,7 +823,7 @@
 			}
 
 			$field = $_POST[$field];
-			
+
 			if (is_array($field))
 			{
 				if ( ! in_array($value, $field))
@@ -933,7 +933,7 @@
 		}
 
 		$att = '';
-		
+
 		foreach ($default as $key => $val)
 		{
 			if ($key == 'value')
@@ -978,7 +978,7 @@
 
 		return ' '.$attributes;
 		}
-	
+
 		if (is_object($attributes) AND count($attributes) > 0)
 		{
 			$attributes = (array)$attributes;
